package com.example.demo.service;

import com.example.demo.mapper.MessageInfoMapper;
import com.example.demo.model.MessageInfo;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageInfoService {
    @Autowired
    private MessageInfoMapper messageInfoMapper;

    public Integer insertMessageInfo(MessageInfo messageInfo) {
        return messageInfoMapper.insertMessageInfo(messageInfo);
    }

    public List<MessageInfo> selectAllMessage() {
        return messageInfoMapper.getMessageInfoList();
    }
}
